package com.zhentao.controller;

import com.zhentao.model.common.app.dto.UserDto;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.service.ApUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 王越潇
 * @version 1.0
 * @Date 2024/9/14 19:04
 * @Type
 */
@RestController
@RequestMapping("ma/user")
@Api(tags = "用户管理",description = "用户管理列表")
public class MaUserController {
    @Resource
    public ApUserService apUserService;
    @ApiOperation("管理端：根据名字和状态查询")
    @PostMapping("findByName")
    public ResponseResult findByName(@RequestBody UserDto userDto){
        return apUserService.findByName(userDto);
    }
    @ApiOperation("管理端：根据用户id查询")
    @GetMapping("findById/{id}")
    public ResponseResult findById(@PathVariable("id") Integer id){
        return apUserService.findById(id);
    }
}
